#!/usr/bin/env python
# -*- coding: utf-8 -*-
# author： 胡浩浩
# datetime： 2021/12/28 12:56 
# ide： PyCharm
from typing import List, Optional
from pydantic import BaseModel


class UserBase(BaseModel):
    pass


class UserCreate(UserBase):
    pass


class User(UserBase):
    id: int
    username: str
    password: str
    name: str
    create_time: str
    update_time: str
    deleted: bool

    class Config:
        orm_mode = True


class GroupBase(BaseModel):
    pass


class GroupCreate(GroupBase):
    pass


class Group(GroupBase):
    id: int
    group_name: str
    group_code: str
    create_time: str
    update_time: str
    deleted: bool

    class Config:
        orm_mode = True


class UserGroupRelationBase(BaseModel):
    pass


class UserGroupRelationCreate(UserGroupRelationBase):
    pass


class UserGroupRelation(UserGroupRelationBase):
    id: int
    user_id: int
    group_id: int
    deleted: str
    create_time: str
    update_time: str

    class Config:
        orm_mode = True
